home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Borland Visual dBASE Professiona v7.0 / DATA1.CAB / Sample_Include / Winmisc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-20  |  27.1 KB  |  716 lines

  1. //--------------------------------------------------------------
  2. //
  3. //  WINMISC.H 
  4. //
  5. //  This file contains Windows API type and constant
  6. //  declarations for calls to the Win32 API from Visual 
  7. //  dBASE. Function prototypes are in WIN32API.PRG.
  8. // 
  9. //  Visual dBASE Samples Group
  10. //
  11. //  $Revision:   1.2  $
  12. //
  13. //  Portions copyright (c) 1991-1995, Microsoft Corp. 
  14. //
  15. //--------------------------------------------------------------
  16.  
  17. #ifndef WINMISC_H
  18. #define WINMISC_H
  19.  
  20. #include <WINDEF.H>
  21.  
  22. // 
  23. // Module Name:
  24. //
  25. //    Adapted from winnetwk.h
  26. //
  27. // Abstract:
  28. //
  29. //    Standard WINNET Header File for WIN32
  30. //
  31. //
  32. // Network types
  33. // 
  34. #define     WNNC_NET_MSNET      0x00010000
  35. #define     WNNC_NET_LANMAN     0x00020000
  36. #define     WNNC_NET_NETWARE    0x00030000
  37. #define     WNNC_NET_VINES      0x00040000
  38. #define     WNNC_NET_10NET      0x00050000
  39. #define     WNNC_NET_LOCUS      0x00060000
  40. #define     WNNC_NET_SUN_PC_NFS 0x00070000
  41. #define     WNNC_NET_LANSTEP    0x00080000
  42. #define     WNNC_NET_9TILES     0x00090000
  43. #define     WNNC_NET_LANTASTIC  0x000A0000
  44. #define     WNNC_NET_AS400      0x000B0000
  45. #define     WNNC_NET_FTP_NFS    0x000C0000
  46. #define     WNNC_NET_PATHWORKS  0x000D0000
  47. #define     WNNC_NET_LIFENET    0x000E0000
  48. #define     WNNC_NET_POWERLAN   0x000F0000
  49. #define     WNNC_NET_BWNFS      0x00100000
  50. #define     WNNC_NET_COGENT      0x00110000
  51. #define     WNNC_NET_FARALLON   0x00120000
  52. #define     WNNC_NET_APPLETALK   0x00130000
  53. #define     WNNC_NET_INTERGRAPH   0x00140000
  54.  
  55. //
  56. //  Network Resources.
  57. //
  58.  
  59. #define RESOURCE_CONNECTED      0x00000001
  60. #define RESOURCE_GLOBALNET      0x00000002
  61. #define RESOURCE_REMEMBERED     0x00000003
  62. #define RESOURCE_RECENT         0x00000004
  63. #define RESOURCE_CONTEXT        0x00000005
  64.  
  65. #define RESOURCETYPE_ANY        0x00000000
  66. #define RESOURCETYPE_DISK       0x00000001
  67. #define RESOURCETYPE_PRINT      0x00000002
  68. #define RESOURCETYPE_RESERVED   0x00000008
  69. #define RESOURCETYPE_UNKNOWN    0xFFFFFFFF
  70.  
  71. #define RESOURCEUSAGE_CONNECTABLE   0x00000001
  72. #define RESOURCEUSAGE_CONTAINER     0x00000002
  73. #define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
  74. #define RESOURCEUSAGE_SIBLING       0x00000008
  75. #define RESOURCEUSAGE_ALL           (bitor(RESOURCEUSAGE_CONNECTABLE, RESOURCEUSAGE_CONTAINER))
  76. #define RESOURCEUSAGE_RESERVED      0x80000000
  77.  
  78. #define RESOURCEDISPLAYTYPE_GENERIC        0x00000000
  79. #define RESOURCEDISPLAYTYPE_DOMAIN         0x00000001
  80. #define RESOURCEDISPLAYTYPE_SERVER         0x00000002
  81. #define RESOURCEDISPLAYTYPE_SHARE          0x00000003
  82. #define RESOURCEDISPLAYTYPE_FILE           0x00000004
  83. #define RESOURCEDISPLAYTYPE_GROUP          0x00000005
  84. #define RESOURCEDISPLAYTYPE_NETWORK        0x00000006
  85. #define RESOURCEDISPLAYTYPE_ROOT           0x00000007
  86. #define RESOURCEDISPLAYTYPE_SHAREADMIN     0x00000008
  87. #define RESOURCEDISPLAYTYPE_DIRECTORY      0x00000009
  88. #define RESOURCEDISPLAYTYPE_TREE           0x0000000A
  89.  
  90. //
  91. //  Network Connections.
  92. // 
  93.  
  94. #define NETPROPERTY_PERSISTENT       1
  95.  
  96. #define CONNECT_UPDATE_PROFILE      0x00000001
  97. #define CONNECT_UPDATE_RECENT       0x00000002
  98. #define CONNECT_TEMPORARY           0x00000004
  99. #define CONNECT_INTERACTIVE         0x00000008
  100. #define CONNECT_PROMPT              0x00000010
  101. #define CONNECT_NEED_DRIVE          0x00000020
  102. #define CONNECT_REFCOUNT            0x00000040
  103. #define CONNECT_REDIRECT            0x00000080
  104. #define CONNECT_LOCALDRIVE          0x00000100
  105. #define CONNECT_CURRENT_MEDIA       0x00000200
  106.  
  107. #define CONNDLG_RO_PATH     0x00000001 /* Resource path should be read-only    */
  108. #define CONNDLG_CONN_POINT  0x00000002 /* Netware -style movable connection point enabled */
  109. #define CONNDLG_USE_MRU     0x00000004 /* Use MRU combobox  */
  110. #define CONNDLG_HIDE_BOX    0x00000008 /* Hide persistent connect checkbox  */
  111.  
  112. //
  113. // NOTE:  Set at most ONE of the below flags.  If neither flag is set,
  114. //        then the persistence is set to whatever the user chose during
  115. //        a previous connection
  116. //
  117. #define CONNDLG_PERSIST     0x00000010 /* Force persistent connection */
  118. #define CONNDLG_NOT_PERSIST 0x00000020 /* Force connection NOT persistent */
  119.  
  120. #define DISC_UPDATE_PROFILE         0x00000001
  121. #define DISC_NO_FORCE               0x00000040
  122.  
  123. //
  124. //  Universal Naming.
  125. //
  126.  
  127. #define UNIVERSAL_NAME_INFO_LEVEL   0x00000001
  128. #define REMOTE_NAME_INFO_LEVEL      0x00000002
  129.  
  130. //
  131. // Other.
  132. //
  133.  
  134. #define WNFMT_MULTILINE         0x01
  135. #define WNFMT_ABBREVIATED       0x02
  136. #define WNFMT_INENUM            0x10
  137. #define WNFMT_CONNECTION        0x20
  138.  
  139. #define NETINFO_DLL16       0x00000001  /* Provider running as 16 bit Winnet Driver */
  140. #define NETINFO_DISKRED     0x00000004  /* Provider requires disk redirections to connect */
  141. #define NETINFO_PRINTERRED  0x00000008  /* Provider requires printer redirections to connect */
  142.  
  143. #define RP_LOGON    0x01        /* if set, do for logon, else for logoff */
  144. #define RP_INIFILE  0x02        /* if set, reconcile .INI file, else reg. hive */
  145.  
  146. //
  147. //  Policies.
  148. //
  149. #define PP_DISPLAYERRORS    0x01    /* if set, display error messages, else fail silently if error */
  150.  
  151. //
  152. //  STATUS CODES
  153. //
  154.  
  155. // General   
  156.  
  157. #define WN_SUCCESS                      NO_ERROR
  158. #define WN_NO_ERROR                     NO_ERROR
  159. #define WN_NOT_SUPPORTED                ERROR_NOT_SUPPORTED
  160. #define WN_CANCEL                       ERROR_CANCELLED
  161. #define WN_RETRY                        ERROR_RETRY
  162. #define WN_NET_ERROR                    ERROR_UNEXP_NET_ERR
  163. #define WN_MORE_DATA                    ERROR_MORE_DATA
  164. #define WN_BAD_POINTER                  ERROR_INVALID_ADDRESS
  165. #define WN_BAD_VALUE                    ERROR_INVALID_PARAMETER
  166. #define WN_BAD_USER                     ERROR_BAD_USERNAME
  167. #define WN_BAD_PASSWORD                 ERROR_INVALID_PASSWORD
  168. #define WN_ACCESS_DENIED                ERROR_ACCESS_DENIED
  169. #define WN_FUNCTION_BUSY                ERROR_BUSY
  170. #define WN_WINDOWS_ERROR                ERROR_UNEXP_NET_ERR
  171. #define WN_OUT_OF_MEMORY                ERROR_NOT_ENOUGH_MEMORY
  172. #define WN_NO_NETWORK                   ERROR_NO_NETWORK
  173. #define WN_EXTENDED_ERROR               ERROR_EXTENDED_ERROR
  174. #define WN_BAD_LEVEL                    ERROR_INVALID_LEVEL
  175. #define WN_BAD_HANDLE                   ERROR_INVALID_HANDLE
  176. #define WN_NOT_INITIALIZING             ERROR_ALREADY_INITIALIZED
  177. #define WN_NO_MORE_DEVICES              ERROR_NO_MORE_DEVICES
  178.  
  179. // Connection
  180.  
  181. #define WN_NOT_CONNECTED                ERROR_NOT_CONNECTED
  182. #define WN_OPEN_FILES                   ERROR_OPEN_FILES
  183. #define WN_DEVICE_IN_USE                ERROR_DEVICE_IN_USE
  184. #define WN_BAD_NETNAME                  ERROR_BAD_NET_NAME
  185. #define WN_BAD_LOCALNAME                ERROR_BAD_DEVICE
  186. #define WN_ALREADY_CONNECTED            ERROR_ALREADY_ASSIGNED
  187. #define WN_DEVICE_ERROR                 ERROR_GEN_FAILURE
  188. #define WN_CONNECTION_CLOSED            ERROR_CONNECTION_UNAVAIL
  189. #define WN_NO_NET_OR_BAD_PATH           ERROR_NO_NET_OR_BAD_PATH
  190. #define WN_BAD_PROVIDER                 ERROR_BAD_PROVIDER
  191. #define WN_CANNOT_OPEN_PROFILE          ERROR_CANNOT_OPEN_PROFILE
  192. #define WN_BAD_PROFILE                  ERROR_BAD_PROFILE
  193. #define WN_BAD_DEV_TYPE                 ERROR_BAD_DEV_TYPE
  194. #define WN_DEVICE_ALREADY_REMEMBERED    ERROR_DEVICE_ALREADY_REMEMBERED
  195.  
  196. // Enumeration
  197.  
  198. #define WN_NO_MORE_ENTRIES              ERROR_NO_MORE_ITEMS
  199. #define WN_NOT_CONTAINER                ERROR_NOT_CONTAINER
  200.  
  201. // Authentication
  202.  
  203. #define WN_NOT_AUTHENTICATED            ERROR_NOT_AUTHENTICATED
  204. #define WN_NOT_LOGGED_ON                ERROR_NOT_LOGGED_ON
  205. #define WN_NOT_VALIDATED                ERROR_NO_LOGON_SERVERS
  206.  
  207. //
  208. //  For Shell
  209. //
  210.  
  211. #define WNCON_FORNETCARD        0x00000001
  212. #define WNCON_NOTROUTED         0x00000002
  213. #define WNCON_SLOWLINK          0x00000004
  214. #define WNCON_DYNAMIC           0x00000008
  215. // End winnetwk.h
  216.  
  217. //
  218. //  Adapted from cderr.h - Common dialog error return codes
  219. //
  220. //  Version 1.0
  221. //
  222.  
  223. #define CDERR_DIALOGFAILURE    0xFFFF
  224.  
  225. #define CDERR_GENERALCODES     0x0000
  226. #define CDERR_STRUCTSIZE       0x0001
  227. #define CDERR_INITIALIZATION   0x0002
  228. #define CDERR_NOTEMPLATE       0x0003
  229. #define CDERR_NOHINSTANCE      0x0004
  230. #define CDERR_LOADSTRFAILURE   0x0005
  231. #define CDERR_FINDRESFAILURE   0x0006
  232. #define CDERR_LOADRESFAILURE   0x0007
  233. #define CDERR_LOCKRESFAILURE   0x0008
  234. #define CDERR_MEMALLOCFAILURE  0x0009
  235. #define CDERR_MEMLOCKFAILURE   0x000A
  236. #define CDERR_NOHOOK           0x000B
  237. #define CDERR_REGISTERMSGFAIL  0x000C
  238.  
  239. #define PDERR_PRINTERCODES     0x1000
  240. #define PDERR_SETUPFAILURE     0x1001
  241. #define PDERR_PARSEFAILURE     0x1002
  242. #define PDERR_RETDEFFAILURE    0x1003
  243. #define PDERR_LOADDRVFAILURE   0x1004
  244. #define PDERR_GETDEVMODEFAIL   0x1005
  245. #define PDERR_INITFAILURE      0x1006
  246. #define PDERR_NODEVICES        0x1007
  247. #define PDERR_NODEFAULTPRN     0x1008
  248. #define PDERR_DNDMMISMATCH     0x1009
  249. #define PDERR_CREATEICFAILURE  0x100A
  250. #define PDERR_PRINTERNOTFOUND  0x100B
  251. #define PDERR_DEFAULTDIFFERENT 0x100C
  252.  
  253. #define CFERR_CHOOSEFONTCODES  0x2000
  254. #define CFERR_NOFONTS          0x2001
  255. #define CFERR_MAXLESSTHANMIN   0x2002
  256.  
  257. #define FNERR_FILENAMECODES    0x3000
  258. #define FNERR_SUBCLASSFAILURE  0x3001
  259. #define FNERR_INVALIDFILENAME  0x3002
  260. #define FNERR_BUFFERTOOSMALL   0x3003
  261.  
  262. #define FRERR_FINDREPLACECODES 0x4000
  263. #define FRERR_BUFFERLENGTHZERO 0x4001
  264.  
  265. #define CCERR_CHOOSECOLORCODES 0x5000
  266. // end cderr.h
  267.  
  268. //
  269. //  Adapted from shellapi.h 
  270. // 
  271. //  SHELL.DLL functions, types, and definitions
  272. //
  273.  
  274. //
  275. // AppBar stuff
  276. //
  277. #define ABM_NEW           0x00000000
  278. #define ABM_REMOVE        0x00000001
  279. #define ABM_QUERYPOS      0x00000002
  280. #define ABM_SETPOS        0x00000003
  281. #define ABM_GETSTATE      0x00000004
  282. #define ABM_GETTASKBARPOS 0x00000005
  283. #define ABM_ACTIVATE      0x00000006  // lParam == TRUE/FALSE means activate/deactivate
  284. #define ABM_GETAUTOHIDEBAR 0x00000007
  285. #define ABM_SETAUTOHIDEBAR 0x00000008  // this can fail at any time.  MUST check the result
  286.                                        // lParam = TRUE/FALSE  Set/Unset
  287.                                        // uEdge = what edge
  288. #define ABM_WINDOWPOSCHANGED 0x0000009
  289.  
  290.  
  291. // these are put in the wparam of callback messages
  292. #define ABN_STATECHANGE    0x0000000
  293. #define ABN_POSCHANGED     0x0000001
  294. #define ABN_FULLSCREENAPP  0x0000002
  295. #define ABN_WINDOWARRANGE  0x0000003 // lParam == TRUE means hide
  296.  
  297. // flags for get state
  298. #define ABS_AUTOHIDE    0x0000001
  299. #define ABS_ALWAYSONTOP 0x0000002
  300.  
  301. #define ABE_LEFT        0
  302. #define ABE_TOP         1
  303. #define ABE_RIGHT       2
  304. #define ABE_BOTTOM      3
  305.  
  306. //
  307. // Shell File Operations
  308. //
  309.  
  310. #define FO_MOVE           0x0001
  311. #define FO_COPY           0x0002
  312. #define FO_DELETE         0x0003
  313. #define FO_RENAME         0x0004
  314.  
  315. #define FOF_MULTIDESTFILES         0x0001
  316. #define FOF_CONFIRMMOUSE           0x0002
  317. #define FOF_SILENT                 0x0004  // don't create progress/report
  318. #define FOF_RENAMEONCOLLISION      0x0008
  319. #define FOF_NOCONFIRMATION         0x0010  // Don't prompt the user.
  320. #define FOF_WANTMAPPINGHANDLE      0x0020  // Fill in SHFILEOPSTRUCT.hNameMappings
  321.                                            // Must be freed using SHFreeNameMappings
  322. #define FOF_ALLOWUNDO              0x0040
  323. #define FOF_FILESONLY              0x0080  // on *.*, do only files
  324. #define FOF_SIMPLEPROGRESS         0x0100  // means don't show names of files
  325. #define FOF_NOCONFIRMMKDIR         0x0200  // don't confirm making any needed dirs
  326.  
  327. // typedef WORD FILEOP_FLAGS;
  328.  
  329. #define PO_DELETE       0x0013  // printer is being deleted
  330. #define PO_RENAME       0x0014  // printer is being renamed
  331. #define PO_PORTCHANGE   0x0020  // port this printer connected to is being changed
  332.                                 // if this id is set, the strings received by
  333.                                 // the copyhook are a doubly-null terminated
  334.                                 // list of strings.  The first is the printer
  335.                                 // name and the second is the printer port.
  336. #define PO_REN_PORT     0x0034  // PO_RENAME and PO_PORTCHANGE at same time.
  337.  
  338. #define PRINTEROP_FLAGS   WORD
  339.  
  340. //
  341. //  Begin ShellExecuteEx and family
  342. //
  343.  
  344. // ShellExecute() and ShellExecuteEx() error codes
  345.  
  346. // regular WinExec() codes
  347. #define SE_ERR_FNF              2       // file not found
  348. #define SE_ERR_PNF              3       // path not found
  349. #define SE_ERR_ACCESSDENIED     5       // access denied
  350. #define SE_ERR_OOM              8       // out of memory
  351. #define SE_ERR_DLLNOTFOUND              32
  352.  
  353. // error values for ShellExecute() beyond the regular WinExec() codes
  354. #define SE_ERR_SHARE                    26
  355. #define SE_ERR_ASSOCINCOMPLETE          27
  356. #define SE_ERR_DDETIMEOUT               28
  357. #define SE_ERR_DDEFAIL                  29
  358. #define SE_ERR_DDEBUSY                  30
  359. #define SE_ERR_NOASSOC                  31
  360.  
  361. // Note CLASSKEY overrides CLASSNAME
  362. #define SEE_MASK_CLASSNAME      0x00000001
  363. #define SEE_MASK_CLASSKEY       0x00000003
  364. // Note INVOKEIDLIST overrides IDLIST
  365. #define SEE_MASK_IDLIST         0x00000004
  366. #define SEE_MASK_INVOKEIDLIST   0x0000000c
  367. #define SEE_MASK_ICON           0x00000010
  368. #define SEE_MASK_HOTKEY         0x00000020
  369. #define SEE_MASK_NOCLOSEPROCESS 0x00000040
  370. #define SEE_MASK_CONNECTNETDRV  0x00000080
  371. #define SEE_MASK_FLAG_DDEWAIT   0x00000100
  372. #define SEE_MASK_DOENVSUBST     0x00000200
  373. #define SEE_MASK_FLAG_NO_UI     0x00000400
  374. #define SEE_MASK_UNICODE        0x00010000
  375.  
  376. //
  377. // Tray notification definitions
  378. //
  379.  
  380. #define NIM_ADD         0x00000000
  381. #define NIM_MODIFY      0x00000001
  382. #define NIM_DELETE      0x00000002
  383.  
  384. #define NIF_MESSAGE     0x00000001
  385. #define NIF_ICON        0x00000002
  386. #define NIF_TIP         0x00000004
  387.  
  388. //
  389. // Begin SHGetFileInfo
  390. //
  391. #define SHGFI_ICON              0x000000100     // get icon
  392. #define SHGFI_DISPLAYNAME       0x000000200     // get display name
  393. #define SHGFI_TYPENAME          0x000000400     // get type name
  394. #define SHGFI_ATTRIBUTES        0x000000800     // get attributes
  395. #define SHGFI_ICONLOCATION      0x000001000     // get icon location
  396. #define SHGFI_EXETYPE           0x000002000     // return exe type
  397. #define SHGFI_SYSICONINDEX      0x000004000     // get system icon index
  398. #define SHGFI_LINKOVERLAY       0x000008000     // put a link overlay on icon
  399. #define SHGFI_SELECTED          0x000010000     // show icon in selected state
  400. #define SHGFI_LARGEICON         0x000000000     // get large icon
  401. #define SHGFI_SMALLICON         0x000000001     // get small icon
  402. #define SHGFI_OPENICON          0x000000002     // get open icon
  403. #define SHGFI_SHELLICONSIZE     0x000000004     // get shell size icon
  404. #define SHGFI_PIDL              0x000000008     // pszPath is a pidl
  405. #define SHGFI_USEFILEATTRIBUTES 0x000000010     // use passed dwFileAttribute
  406.  
  407. #define SHGNLI_PIDL             0x000000001     // pszLinkTo is a pidl
  408. #define SHGNLI_PREFIXNAME       0x000000002     // Make name "Shortcut to xxx"
  409. // End shellapi.h
  410.  
  411. //
  412. //  Adapted from commdlg.h
  413. //
  414. //  This module defines the 32-Bit Common Dialog APIs
  415. //
  416.  
  417. #define OFN_READONLY                 0x00000001
  418. #define OFN_OVERWRITEPROMPT          0x00000002
  419. #define OFN_HIDEREADONLY             0x00000004
  420. #define OFN_NOCHANGEDIR              0x00000008
  421. #define OFN_SHOWHELP                 0x00000010
  422. #define OFN_ENABLEHOOK               0x00000020
  423. #define OFN_ENABLETEMPLATE           0x00000040
  424. #define OFN_ENABLETEMPLATEHANDLE     0x00000080
  425. #define OFN_NOVALIDATE               0x00000100
  426. #define OFN_ALLOWMULTISELECT         0x00000200
  427. #define OFN_EXTENSIONDIFFERENT       0x00000400
  428. #define OFN_PATHMUSTEXIST            0x00000800
  429. #define OFN_FILEMUSTEXIST            0x00001000
  430. #define OFN_CREATEPROMPT             0x00002000
  431. #define OFN_SHAREAWARE               0x00004000
  432. #define OFN_NOREADONLYRETURN         0x00008000
  433. #define OFN_NOTESTFILECREATE         0x00010000
  434. #define OFN_NONETWORKBUTTON          0x00020000
  435. #define OFN_NOLONGNAMES              0x00040000     // force no long names for 4.x modules
  436.  
  437. #define OFN_EXPLORER                 0x00080000     // new look commdlg
  438. #define OFN_NODEREFERENCELINKS       0x00100000
  439. #define OFN_LONGNAMES                0x00200000     // force long names for 3.x modules
  440.  
  441. // Return values for the registered message sent to the hook function
  442. // when a sharing violation occurs.  OFN_SHAREFALLTHROUGH allows the
  443. // filename to be accepted, OFN_SHARENOWARN rejects the name but puts
  444. // up no warning (returned when the app has already put up a warning
  445. // message), and OFN_SHAREWARN puts up the default warning message
  446. // for sharing violations.
  447. //
  448. // Note:  Undefined return values map to OFN_SHAREWARN, but are
  449. //        reserved for future use.
  450.  
  451. #define OFN_SHAREFALLTHROUGH     2
  452. #define OFN_SHARENOWARN          1
  453. #define OFN_SHAREWARN            0
  454.  
  455.  
  456. #define CDN_FIRST                4294966695   // (0U-601U)
  457. #define CDN_LAST                 4294966597   // (0U-699U)
  458.  
  459. // Notifications when Open or Save dialog status changes
  460. #define CDN_INITDONE            (CDN_FIRST - 0x0000)
  461. #define CDN_SELCHANGE           (CDN_FIRST - 0x0001)
  462. #define CDN_FOLDERCHANGE        (CDN_FIRST - 0x0002)
  463. #define CDN_SHAREVIOLATION      (CDN_FIRST - 0x0003)
  464. #define CDN_HELP                (CDN_FIRST - 0x0004)
  465. #define CDN_FILEOK              (CDN_FIRST - 0x0005)
  466. #define CDN_TYPECHANGE          (CDN_FIRST - 0x0006)
  467.  
  468. #define CDM_FIRST       (WM_USER + 100)
  469. #define CDM_LAST        (WM_USER + 200)
  470.  
  471. // Messages to query information from the Open or Save dialogs
  472.  
  473. // lParam = pointer to text buffer that gets filled in
  474. // wParam = max number of characters of the text buffer (including NULL)
  475. // return = < 0 if error; number of characters needed (including NULL)
  476. #define CDM_GETSPEC             (CDM_FIRST + 0x0000)
  477.  
  478. // lParam = pointer to text buffer that gets filled in
  479. // wParam = max number of characters of the text buffer (including NULL)
  480. // return = < 0 if error; number of characters needed (including NULL)
  481. #define CDM_GETFILEPATH         (CDM_FIRST + 0x0001)
  482.  
  483. // lParam = pointer to text buffer that gets filled in
  484. // wParam = max number of characters of the text buffer (including NULL)
  485. // return = < 0 if error; number of characters needed (including NULL)
  486. #define CDM_GETFOLDERPATH       (CDM_FIRST + 0x0002)
  487.  
  488. // lParam = pointer to ITEMIDLIST buffer that gets filled in
  489. // wParam = size of the ITEMIDLIST buffer
  490. // return = < 0 if error; length of buffer needed
  491. #define CDM_GETFOLDERIDLIST     (CDM_FIRST + 0x0003)
  492.  
  493. // lParam = pointer to a string
  494. // wParam = ID of control to change
  495. // return = not used
  496. #define CDM_SETCONTROLTEXT      (CDM_FIRST + 0x0004)
  497.  
  498. // lParam = not used
  499. // wParam = ID of control to change
  500. // return = not used
  501. #define CDM_HIDECONTROL         (CDM_FIRST + 0x0005)
  502.  
  503. // lParam = pointer to default extension (no dot)
  504. // wParam = not used
  505. // return = not used
  506. #define CDM_SETDEFEXT           (CDM_FIRST + 0x0006)
  507.  
  508. // ChooseColor Dialog
  509. #define CC_RGBINIT               0x00000001
  510. #define CC_FULLOPEN              0x00000002
  511. #define CC_PREVENTFULLOPEN       0x00000004
  512. #define CC_SHOWHELP              0x00000008
  513. #define CC_ENABLEHOOK            0x00000010
  514. #define CC_ENABLETEMPLATE        0x00000020
  515. #define CC_ENABLETEMPLATEHANDLE  0x00000040
  516. #define CC_SOLIDCOLOR            0x00000080
  517. #define CC_ANYCOLOR              0x00000100
  518.  
  519. // FindReplace Dialog
  520. #define FR_DOWN                         0x00000001
  521. #define FR_WHOLEWORD                    0x00000002
  522. #define FR_MATCHCASE                    0x00000004
  523. #define FR_FINDNEXT                     0x00000008
  524. #define FR_REPLACE                      0x00000010
  525. #define FR_REPLACEALL                   0x00000020
  526. #define FR_DIALOGTERM                   0x00000040
  527. #define FR_SHOWHELP                     0x00000080
  528. #define FR_ENABLEHOOK                   0x00000100
  529. #define FR_ENABLETEMPLATE               0x00000200
  530. #define FR_NOUPDOWN                     0x00000400
  531. #define FR_NOMATCHCASE                  0x00000800
  532. #define FR_NOWHOLEWORD                  0x00001000
  533. #define FR_ENABLETEMPLATEHANDLE         0x00002000
  534. #define FR_HIDEUPDOWN                   0x00004000
  535. #define FR_HIDEMATCHCASE                0x00008000
  536. #define FR_HIDEWHOLEWORD                0x00010000
  537.  
  538.  
  539. // ChooseFont Dialog
  540. #define CF_SCREENFONTS             0x00000001
  541. #define CF_PRINTERFONTS            0x00000002
  542. #define CF_BOTH                    (bitor(CF_SCREENFONTS,CF_PRINTERFONTS))
  543. #define CF_SHOWHELP                0x00000004
  544. #define CF_ENABLEHOOK              0x00000008
  545. #define CF_ENABLETEMPLATE          0x00000010
  546. #define CF_ENABLETEMPLATEHANDLE    0x00000020
  547. #define CF_INITTOLOGFONTSTRUCT     0x00000040
  548. #define CF_USESTYLE                0x00000080
  549. #define CF_EFFECTS                 0x00000100
  550. #define CF_APPLY                   0x00000200
  551. #define CF_ANSIONLY                0x00000400
  552. #define CF_SCRIPTSONLY             CF_ANSIONLY
  553. #define CF_NOVECTORFONTS           0x00000800
  554. #define CF_NOOEMFONTS              CF_NOVECTORFONTS
  555. #define CF_NOSIMULATIONS           0x00001000
  556. #define CF_LIMITSIZE               0x00002000
  557. #define CF_FIXEDPITCHONLY          0x00004000
  558. #define CF_WYSIWYG                 0x00008000 // must also have CF_SCREENFONTS & CF_PRINTERFONTS
  559. #define CF_FORCEFONTEXIST          0x00010000
  560. #define CF_SCALABLEONLY            0x00020000
  561. #define CF_TTONLY                  0x00040000
  562. #define CF_NOFACESEL               0x00080000
  563. #define CF_NOSTYLESEL              0x00100000
  564. #define CF_NOSIZESEL               0x00200000
  565. #define CF_SELECTSCRIPT            0x00400000
  566. #define CF_NOSCRIPTSEL             0x00800000
  567. #define CF_NOVERTFONTS             0x01000000
  568.  
  569. // these are extra nFontType bits that are added to what is returned to the
  570. // EnumFonts callback routine
  571.  
  572. #define SIMULATED_FONTTYPE         0x8000
  573. #define PRINTER_FONTTYPE           0x4000
  574. #define SCREEN_FONTTYPE            0x2000
  575. #define BOLD_FONTTYPE              0x0100
  576. #define ITALIC_FONTTYPE            0x0200
  577. #define REGULAR_FONTTYPE           0x0400
  578.  
  579. #define WM_CHOOSEFONT_GETLOGFONT      (WM_USER + 1)
  580. #define WM_CHOOSEFONT_SETLOGFONT      (WM_USER + 101)
  581. #define WM_CHOOSEFONT_SETFLAGS        (WM_USER + 102)
  582.  
  583. // strings used to obtain unique window message for communication
  584. // between dialog and caller
  585.  
  586. #define LBSELCHSTRINGA  "commdlg_LBSelChangedNotify"
  587. #define SHAREVISTRINGA  "commdlg_ShareViolation"
  588. #define FILEOKSTRINGA   "commdlg_FileNameOK"
  589. #define COLOROKSTRINGA  "commdlg_ColorOK"
  590. #define SETRGBSTRINGA   "commdlg_SetRGBColor"
  591. #define HELPMSGSTRINGA  "commdlg_help"
  592. #define FINDMSGSTRINGA  "commdlg_FindReplace"
  593.  
  594. #define LBSELCHSTRING  LBSELCHSTRINGA
  595. #define SHAREVISTRING  SHAREVISTRINGA
  596. #define FILEOKSTRING   FILEOKSTRINGA
  597. #define COLOROKSTRING  COLOROKSTRINGA
  598. #define SETRGBSTRING   SETRGBSTRINGA
  599. #define HELPMSGSTRING  HELPMSGSTRINGA
  600. #define FINDMSGSTRING  FINDMSGSTRINGA
  601.  
  602. // HIWORD values for lParam of commdlg_LBSelChangeNotify message
  603. #define CD_LBSELNOITEMS -1
  604. #define CD_LBSELCHANGE   0
  605. #define CD_LBSELSUB      1
  606. #define CD_LBSELADD      2
  607.  
  608.  
  609. // Print Dialog
  610. #define PD_ALLPAGES                  0x00000000
  611. #define PD_SELECTION                 0x00000001
  612. #define PD_PAGENUMS                  0x00000002
  613. #define PD_NOSELECTION               0x00000004
  614. #define PD_NOPAGENUMS                0x00000008
  615. #define PD_COLLATE                   0x00000010
  616. #define PD_PRINTTOFILE               0x00000020
  617. #define PD_PRINTSETUP                0x00000040
  618. #define PD_NOWARNING                 0x00000080
  619. #define PD_RETURNDC                  0x00000100
  620. #define PD_RETURNIC                  0x00000200
  621. #define PD_RETURNDEFAULT             0x00000400
  622. #define PD_SHOWHELP                  0x00000800
  623. #define PD_ENABLEPRINTHOOK           0x00001000
  624. #define PD_ENABLESETUPHOOK           0x00002000
  625. #define PD_ENABLEPRINTTEMPLATE       0x00004000
  626. #define PD_ENABLESETUPTEMPLATE       0x00008000
  627. #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
  628. #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
  629. #define PD_USEDEVMODECOPIES          0x00040000
  630. #define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
  631. #define PD_DISABLEPRINTTOFILE        0x00080000
  632. #define PD_HIDEPRINTTOFILE           0x00100000
  633. #define PD_NONETWORKBUTTON           0x00200000
  634.  
  635. #define DN_DEFAULTPRN      0x0001
  636.  
  637.  
  638. // PageSetup Dialog
  639. #define WM_PSD_PAGESETUPDLG     (WM_USER  )
  640. #define WM_PSD_FULLPAGERECT     (WM_USER+1)
  641. #define WM_PSD_MINMARGINRECT    (WM_USER+2)
  642. #define WM_PSD_MARGINRECT       (WM_USER+3)
  643. #define WM_PSD_GREEKTEXTRECT    (WM_USER+4)
  644. #define WM_PSD_ENVSTAMPRECT     (WM_USER+5)
  645. #define WM_PSD_YAFULLPAGERECT   (WM_USER+6)
  646.  
  647. #define PSD_DEFAULTMINMARGINS             0x00000000 // default (printer's)
  648. #define PSD_INWININIINTLMEASURE           0x00000000 // 1st of 4 possible
  649.  
  650. #define PSD_MINMARGINS                    0x00000001 // use caller's
  651. #define PSD_MARGINS                       0x00000002 // use caller's
  652. #define PSD_INTHOUSANDTHSOFINCHES         0x00000004 // 2nd of 4 possible
  653. #define PSD_INHUNDREDTHSOFMILLIMETERS     0x00000008 // 3rd of 4 possible
  654. #define PSD_DISABLEMARGINS                0x00000010
  655. #define PSD_DISABLEPRINTER                0x00000020
  656. #define PSD_NOWARNING                     0x00000080 // must be same as PD_*
  657. #define PSD_DISABLEORIENTATION            0x00000100
  658. #define PSD_RETURNDEFAULT                 0x00000400 // must be same as PD_*
  659. #define PSD_DISABLEPAPER                  0x00000200
  660. #define PSD_SHOWHELP                      0x00000800 // must be same as PD_*
  661. #define PSD_ENABLEPAGESETUPHOOK           0x00002000 // must be same as PD_*
  662. #define PSD_ENABLEPAGESETUPTEMPLATE       0x00008000 // must be same as PD_*
  663. #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000 // must be same as PD_*
  664. #define PSD_ENABLEPAGEPAINTHOOK           0x00040000
  665. #define PSD_DISABLEPAGEPAINTING           0x00080000
  666. // End commdlg.h
  667.  
  668. //
  669. //  Adapted from mcx.h
  670. //
  671. //  This module defines the 32-Bit Windows MCX APIs
  672. //
  673.  
  674. // Dial Options
  675. #define DIALOPTION_BILLING  0x00000040  // Supports wait for bong "$"
  676. #define DIALOPTION_QUIET    0x00000080  // Supports wait for quiet "@"
  677. #define DIALOPTION_DIALTONE 0x00000100  // Supports wait for dial tone "W"
  678.  
  679. // SpeakerVolume for MODEMDEVCAPS
  680. #define MDMVOLFLAG_LOW      0x00000001
  681. #define MDMVOLFLAG_MEDIUM   0x00000002
  682. #define MDMVOLFLAG_HIGH     0x00000004
  683.  
  684. // SpeakerVolume for MODEMSETTINGS
  685. #define MDMVOL_LOW          0x00000000
  686. #define MDMVOL_MEDIUM       0x00000001
  687. #define MDMVOL_HIGH         0x00000002
  688.  
  689. // SpeakerMode for MODEMDEVCAPS
  690. #define MDMSPKRFLAG_OFF         0x00000001
  691. #define MDMSPKRFLAG_DIAL        0x00000002
  692. #define MDMSPKRFLAG_ON          0x00000004
  693. #define MDMSPKRFLAG_CALLSETUP   0x00000008
  694.  
  695. // SpeakerMode for MODEMSETTINGS
  696. #define MDMSPKR_OFF         0x00000000
  697. #define MDMSPKR_DIAL        0x00000001
  698. #define MDMSPKR_ON          0x00000002
  699. #define MDMSPKR_CALLSETUP   0x00000003
  700.  
  701. // Modem Options
  702. #define MDM_COMPRESSION      0x00000001
  703. #define MDM_ERROR_CONTROL    0x00000002
  704. #define MDM_FORCED_EC        0x00000004
  705. #define MDM_CELLULAR         0x00000008
  706. #define MDM_FLOWCONTROL_HARD 0x00000010
  707. #define MDM_FLOWCONTROL_SOFT 0x00000020
  708. #define MDM_CCITT_OVERRIDE   0x00000040
  709. #define MDM_SPEED_ADJUST     0x00000080
  710. #define MDM_TONE_DIAL        0x00000100
  711. #define MDM_BLIND_DIAL       0x00000200
  712. #define MDM_V23_OVERRIDE     0x00000400
  713. // End mcx.h
  714.  
  715. #endif  // WINMISC_H
  716.